import { defineStore } from "pinia";

export const useGlobalStore = defineStore('useGlobalStore', {
  state: () => ({ layout: 'layout1',collapse:false }),
  getters: {
    getLayout: (state) => state.layout,
    isCollapse: (state) => state.collapse,
  },
  actions: {
    changeLayout(key: string) {
      this.layout = key;
    },
    setCollapse(val: boolean) {
      this.collapse = val;
    },
  },
  // persist:true
})